STEP 13: Now that our function's written, we should call it!

  • Let's predict how much sleep a student would get if he or she were 50 minutes from school.
  • In , drag in Return Variable OUTSIDE and BELOW your function.
  • Change my_function(my_var) to line(slope, 50, y_intercept).
  • Change the variable to the left of the = sign from my_var to predicted_sleep.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)